<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<c:set var="ctx" value="${pageContext.request.contextPath}" />
<div class="container" style="padding-top: 20px" id="messagePage">
	<div class="message-contant">
		<h2>消息中心</h2>
		<div class="container-fluid">
			<div class="tabs-left">
				<ul class="nav nav-tabs nav-stacked" id="msgTab">
				</ul>
			</div>
			<div class="tab-content" style="margin-top: 0px;">
				<!-- 我评论的 -->
				<div class="tab-pane" id="panel-505741">
					<div style="margin-bottom: 5px;" id="panel-505741-count"></div>
					<div id="panel-505741-table">
						<div class="laoding-round"></div>
					</div>
				</div>
				<!-- 评论我的 -->
				<div class="tab-pane" id="panel-205570">
					<div style="margin-bottom: 5px;" id="panel-205570-count"></div>
					<div id="panel-205570-table">
						<div class="laoding-round"></div>
					</div>
				</div>

				<!-- 查看对话弹出框 -->
				<div id="check_dialogue" class="modal hide fade" role="dialog"
					aria-labelledby="myModalLabel" aria-hidden="true"
					style="padding-bottom: 20px;">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true"></button>
						查看对话
					</div>
					<div class="line_shu"></div>
					<input type="hidden" value="" id="input-date">
					<div id="showDialogue" style="width:510px;">
						<div class="laoding-round"></div>
					</div>
				</div>
				<!-- 优惠券地址列表 -->
				<div id="con-add" class="modal hide fade" role="dialog"
					aria-labelledby="myModalLabel" aria-hidden="true"
					style="padding-bottom: 20px;">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true"></button>
						请选择您要发送的地址
					</div>
					<div id="conaddress">
						<div class="laoding-round"></div>
					</div>
				</div>
				<!-- 私信 -->
				<div class="tab-pane" id="panel-205571">
					<div style="margin-bottom: 5px;" id="panel-205571-count"></div>
					<div id="panel-205571-table">
						<div class="laoding-round"></div>
					</div>
				</div>
				<!-- 系统通知 -->
				<div class="tab-pane" id="panel-205572">
					<div class="message-content" id="systemInfor">
						<div class="laoding-round"></div>
					</div>
				</div>
				<!-- 我的优惠 -->
				<div class="tab-pane" id="panel-coupon">
					<div class="message-content" id="panel-coupon-count">
						<div class="laoding-round"></div>
					</div>
				</div>
				<!-- 我的礼品 -->
				<div class="tab-pane active" id="panel-gift">
					<div class="message-content" id="panel-gift-count">
						<div class="laoding-round"></div>
					</div>
				</div>			
			</div>
		</div>
	</div>

<script type="text/html" id="msgTab-template">
<$if( unreadPresentCount > 0 && unreadPresentCount <= 99){$>
	<li class="active"><a href="#panel-gift" class="tab2" data-toggle="tab" id="giftbtn">我的礼品(<$=unreadPresentCount$>)</a></li>
<$}else if(unreadPresentCount > 100){$>
	<li class="active"><a href="#panel-gift" class="tab2" data-toggle="tab" id="giftbtn">我的礼品(99+)</a></li>
<$}else{$>
	<li class="active"><a href="#panel-gift" class="tab2" data-toggle="tab" id="giftbtn">我的礼品</a></li>
<$}$>
<$if( unusedCouponCount > 0 && unusedCouponCount <= 99){$>
	<li><a href="#panel-coupon" class="tab2" data-toggle="tab" id="couponbtn">我的优惠券(<$=unusedCouponCount$>)</a></li>
<$}else if(unusedCouponCount > 100){$>	
	<li><a href="#panel-coupon" class="tab2" data-toggle="tab" id="couponbtn">我的优惠券(99+)</a></li>
<$}else{$>
	<li><a href="#panel-coupon" class="tab2" data-toggle="tab" id="couponbtn">我的优惠券</a></li>	
<$}$>
<$if( unreadMessageCount > 0 && unreadMessageCount <= 99){$>
	<li><a href="#panel-205572" class="tab2" data-toggle="tab" id="messagebtn">系统通知(<$=unreadMessageCount$>)</a></li>
<$}else if(unreadMessageCount > 100){$>
	<li><a href="#panel-205572" class="tab2" data-toggle="tab" id="messagebtn">系统通知(99+)</a></li>
<$}else{$>
	<li><a href="#panel-205572" class="tab2" data-toggle="tab" id="messagebtn">系统通知</a></li>
<$}$>
<$if( unreadLetterCount > 0 && unreadLetterCount <= 99){$>
	<li><a href="#panel-205571" class="tab2" data-toggle="tab" id="letterbtn">私信(<$=unreadLetterCount$>)</a></li>
<$}else if(unreadLetterCount > 100){$>
	<li><a href="#panel-205571" class="tab2" data-toggle="tab" id="letterbtn">私信(99+)</a></li>
<$}else{$>
	<li><a href="#panel-205571" class="tab2" data-toggle="tab" id="letterbtn">私信</a></li>
<$}$>
<li><a href="#panel-505741" class="tab1" data-toggle="tab" id="meCommentbtn">我评论的</a></li>

<$if( (unreadCommentCount+unreadPreferntialCommentCount) > 0 && (unreadCommentCount+unreadPreferntialCommentCount) <= 99){$>
	<li><a href="#panel-205570" class="tab2" data-toggle="tab" id="commentToMebtn">评论我的(<$=(unreadCommentCount+unreadPreferntialCommentCount)$>)</a></li>
<$}else if((unreadCommentCount+unreadPreferntialCommentCount) > 100){$>
	<li><a href="#panel-205570" class="tab2" data-toggle="tab" id="commentToMebtn">评论我的(99+)</a></li>
<$}else{$>
	<li><a href="#panel-205570" class="tab2" data-toggle="tab" id="commentToMebtn">评论我的</a></li>
<$}$>





	

    

</script>
	<!-- 我评论的 -->
<script type="text/html" id="panel-505741-table-template">
<$ if ( result.length <= 0 ) { $>
	<span class="empty-center">亲，你还没有评论哦.(=・ω・=)</span>
<$}else{$>
	<b><div class="message-count" style="margin-bottom: 5px;">共<$=totalCount$>条</div></b>
	<$ for (var i = 0; i < result.length; i ++) { $>
		<$if(result[i].userCommentIsDelete=="0"){$>
			<div class="comment-item clearfix">
				<div class="message-user-pic" style="width:60px;">
					<a style="padding:0px" href="${ctx }/home?id=<$=result[i].userId$>">
						<img src="<$=result[i].userAttachment$>/60x60" alt="60*60" title="<$=result[i].userName$>"  style="width:60px;height:60px;"/>
					</a>
				</div>

				<div class="comment-right">
					<div class="div-z1">
						<a class="message-user-div-a color_theme" href="${ctx}/home?id=<$=result[i].userId$>">
							<$if(result[i].userRole=='institution'){$>
								<i class="institution-icon" style="position:relative;top:2px;"></i>
							<$}$>
						</a>
						<$if(result[i].projectId == null && result[i].preferentialId != null) {$>
							<a class="message-user-div-a color_theme" href="${ctx}/project/preferential/detail?id=<$=result[i].preferentialId$>">
						<$} else if(result[i].projectId != null && result[i].preferentialId == null) {$>
							<a class="message-user-div-a color_theme" href="${ctx}/project/detail?id=<$=result[i].projectId$>">
						<$}$>
						<span>我的评论：</span>
						</a>
						<span style="word-break:break-all;width:89%;"><$=result[i].userContent$></span>
					</div>
					<$if(result[i].superId==null){$>
						<$if(result[i].projectId == null && result[i].preferentialId != null){$>
							<div class="div-z2">
								<span style="float:left;">在活动</span>
								<a class="message-user-div-a color_theme" href="${ctx}/project/preferential/detail?id=<$=result[i].preferentialId$>"><$=result[i].preferentialName$></a>
								<span>中</span>&nbsp;
								<span></span>
							</div>
							<div class="message_time">
								<span class="me_comment_msg"><$=result[i].userCreatedDate$></span>
								<a href="${ctx}/project/preferential/detail?id=<$=result[i].preferentialId$>"><span class="comment-op">原文</span>
								</a>
							</div>
						<$}else if(result[i].projectId != null && result[i].preferentialId == null) {$>
							<div class="div-z2">
								<span style="float:left;">在服务</span>
								<a class="message-user-div-a color_theme" href="${ctx}/project/detail?id=<$=result[i].projectId$>">
									<$=result[i].projectName$></a>
								<span>中</span>&nbsp;
								<span></span>
							</div>
							<div class="message_time">
								<span class="me_comment_msg"><$=result[i].userCreatedDate$></span>
								<a href="${ctx }/project/detail?id=<$= result[i].projectId $>#comment"><span class="comment-op">原文</span></a>
							</div>
						<$}$>
					<$}else{$>
						<$if(result[i].projectId == null && result[i].preferentialId != null){$>
							<div class="div-z2">
								<span style="float:left;">在活动</span>
								<a class="message-user-div-a color_theme" href="${ctx}/project/preferential/detail?id=<$=result[i].preferentialId$>"><$=result[i].preferentialName$></a>
								<span>中</span>&nbsp;
								<span></span>
								<span style="float:left;">回复</span>
								<a class="message-user-div-a"><$=result[i].superName$></a>
								<span>的评论：</span>&nbsp;
								<span style="word-break:break-all;">“ <$=result[i].superContent$>”</span>
							</div>
							<div class="message_time">
								<span class="me_comment_msg"><$=result[i].userCreatedDate$></span>
								<a href="${ctx}/project/preferential/detail?id=<$=result[i].preferentialId$>"><span class="comment-op">原文</span>
								</a>
							</div>
						<$}else if(result[i].projectId != null && result[i].preferentialId == null) {$>
							<div class="div-z2">
								<span style="float:left;">在服务</span>
								<a class="message-user-div-a color_theme" href="${ctx}/project/detail?id=<$=result[i].projectId$>">
									<$=result[i].projectName$></a>
								<span>中</span>&nbsp;
								<span></span>
								<span style="float:left;">回复</span>
								<a class="message-user-div-a"><$=result[i].superName$></a>
								<span>的评论：</span>&nbsp;
								<span style="word-break:break-all;">“ <$=result[i].superContent$>”</span>
							</div>
							<div class="message_time">
								<span class="me_comment_msg"><$=result[i].userCreatedDate$></span>
								<a href="${ctx }/project/detail?id=<$= result[i].projectId $>#comment"><span class="comment-op">原文</span></a>
							</div>
						<$}$>
					<$}$>
				</div>

			</div>
		<$}$>
	<$}$>		
<$}$>
<div class="pagination">
		<$==pagination$>
</div>
</script>
	<!--  我的礼品-->
	<script type="text/html" id="panel-505742-table-template">
<$ if (result.length <= 0 ) { $>
			<span class="empty-center">额哦，还没有礼品哦.(=・ω・=)</span>
		<$}else{$>
			<b><div class="message-count" style="margin-bottom: 5px;">共 <span style="color:blue;"><$=totalCount$></span> 件礼物</div></b>
<table class="table table-hover table-condensed">
		<thead>
			<tr>
				<th width="10%">服务</th>
				<th width="20%" class="">名称</th>
				<th width="20%">地点</th>
				<th width="10%">礼品数量</th>
				<th width="15%">送礼时间</th>
                <th width="15%">送礼人</th>
			</tr>
		</thead>
<tbody>
<$for(var i = 0;i<result.length;i++){$>
<tr>
<td class="">
<a style="padding:0px" href="${ctx }/project/detail?id=<$=result[i].support.project.id$>"><img src="<$=result[i].support.project.photoUrl$>/60x60" alt="60*60" title="<$=result[i].support.project.name$>"  style="width:60px;height:60px;"/></a>
</td>
<td class="txtcenter"><$=result[i].support.project.name$></td>
<td class="txtcenter"><$=result[i].support.project.address$></td>
<td class="txtcenter"><$=result[i].support.productAmount$></td>
<td class="txtcenter"><$=result[i].support.createdDate$></td>
<td class="txtcenter"><$=result[i].support.user.name$></td>
</tr>				
<$}$>
</tbody>
</table>
<$}$>	
<div class="pagination">
		<$==pagination$>
</div>
</script>
	
	<!-- 评论我的-->
	<script type="text/html" id="panel-205570-table-template">
<$ if ( result.length <= 0 ) { $>
	<span class="empty-center">亲，你还没有评论哦.(=・ω・=)</span>
<$}else{$>
	<b><div class="message-count" style="margin-bottom: 5px;">共<$=totalCount$>条</div></b>
	<$for(var i = 0;i<result.length;i++){$>
		<div class="comment-item clearfix">
			<div class="message-user-pic" style="width:60px">
				<a style="padding:0px" href="${ctx }/home?id=<$=result[i].userId$>"><img src="<$=result[i].userAttachment$>/60x60" alt="60*60" title="<$=result[i].userName$>" style="width:60px;height:60px;"/></a>
			</div>
 			<div class="comment-right">				
							<$if(result[i].superId==null){$>
								<div class="div-z1">
										<a class="message-user-div-a color_theme" href="${ctx }/home?id=<$=result[i].userId$>">
										<$if(result[i].userRole=='institution'){$>
											<i class="institution-icon" style="position:relative;top:4px;" ></i>
										<$}$>											
											<$=result[i].userName$> 											
										</a>	
										<span >评论&nbsp;</span>									
										<span style="word-break:break-all;width:89%;">：<$=result[i].userContent$></span>
									</div>
								<div class="div-z2">
										<span style="float:left;">评论&nbsp;</span>
											 <span style="float:left;">我的服务</span>&nbsp<a class="message-user-div-a color_theme"
											href="${ctx }/project/detail?id=<$=result[i].projectId$>#comment"><$=result[i].projectName$></a>
								</div>
								<div class="message_time">
										<span class="me_comment_msg"><$=result[i].userCreatedDate$> </span><a href="${ctx }/project/detail?id=<$= result[i].projectId $>#comment"><span class="comment-op">原文</span></a>
								</div>
        					<$}else{$>
								<div class="div-z1">
									<span>回复</span><a class="message-user-div-a" href="${ctx }/home?id=<$=result[i].superId$>">
										<$if(result[i].superRole=='institution'){$>
											<i class="institution-icon" style="position:relative;top:4px;"></i>
										<$}$>
											<$=result[i].superName$>
										</a>
										<span style="word-break:break-all;width:80%;">：<$=result[i].userContent$></span>
								</div>
								<$if(result[i].projectId == null && result[i].preferentialId != null){$>
									<div class="div-z2">
										<span style="float:left;">在活动</span>
											<a class="message-user-div-a color_theme" href="${ctx}/project/preferential/detail?id=<$=result[i].preferentialId$>"><$=result[i].preferentialName$></a>
											<span style="float:left;">中&nbsp;</span>
											<span></span>
											<span style="float:left;">回复</span><a class="message-user-div-a"href="${ctx }/home">我</a>
											<span>的评论：</span>&nbsp;
											<span style="word-break:break-all;">“ <$=result[i].superContent$>”</span>
									</div>
									<div class="message_time">
										<span class="me_comment_msg"><$=result[i].userCreatedDate$> </span>
										<a href="${ctx}/project/preferential/detail?id=<$=result[i].preferentialId$>">
											<span id="showComDia" data='{"sid":"<$=result[i].superId$>"}'>原文</span>
										</a>
									</div>
								<$}else if(result[i].projectId != null && result[i].preferentialId == null) {$>
									<div class="div-z2">
										<span style="float:left;">在服务</span>
											<a class="message-user-div-a color_theme" href="${ctx}/project/detail?id=<$=result[i].projectId$>">
												<$=result[i].projectName$></a>
											<span style="float:left;">中&nbsp;</span>
											<span></span>
											<span style="float:left;">回复</span><a class="message-user-div-a"href="${ctx }/home">我</a>
											<span>的评论：</span>&nbsp;
											<span style="word-break:break-all;">“ <$=result[i].superContent$>”</span>
									</div>
									<div class="message_time">
										<span class="me_comment_msg"><$=result[i].userCreatedDate$> </span>
										<a href="${ctx }/project/detail?id=<$= result[i].projectId $>#comment">
											<span id="showComDia" data='{"sid":"<$=result[i].superId$>"}'>原文</span>
										</a>
									</div>
								<$}$>
							<$}$>
							</div>
					</div>
<$}$>
<$}$>	
<div class="pagination">
		<$==pagination$>
</div>
</script>

	<!-- 私信 -->
	<script type="text/html" id="panel-205571-table-template">
<$ if ( newestLetter.result.length <= 0 ) { $>
			<span class="empty-center">额哦，还没有私信哦.(=・ω・=)</span>
		<$}else{$>
			<b><div class="message-count" style="margin-bottom: 5px;"><$=newestLetter.result.length$>个联系人</div></b>
<$for(var i = 0;i<newestLetter.result.length;i++){$>
<div class="comment-item clearfix">
				<div class="message-user-pic" style="width: 60px;">
					<a style="padding:0px" href="${ctx }/home?id=<$=newestLetter.result[i].friendId$>"><img src="<$=newestLetter.result[i].friendAttachment$>/60x60" alt="60*60" title="<$=newestLetter.result[i].friendName$>" style="width:60px;height:60px;"/></a>
					<$if(newestLetter.result[i].isRead == 0){$>
					<span id="unread" class="unread"></span>
					<$}$>
				</div>
				<div class="comment-right">
					<div>
						<a class="message-user-div-a" href="${ctx }/home"><$if(newestLetter.result[i].friendRole=='institution'){$><i class="institution-icon" ></i><$}else if(newestLetter.result[i].friendRole=='charitarian'){$><i class="charitarian-icon" ></i><$}$>
	<$=newestLetter.result[i].friendName$></a><span>：</span><span style="word-break:break-all;width:85%;padding-left:10px;"><$=newestLetter.result[i].content$></span>
					</div>
					<div class="message_time clearfix">
						<span class="me_comment_msg"><$=newestLetter.result[i].createDate$> </span> <span class="chart btn-link" data="<$=newestLetter.result[i].friendId$>">回复</span>
                         <a href="#check_dialogue" class="show_Dialogue" data-toggle="modal"  data='{"sid":"<$=newestLetter.result[i].friendId$>"}'><span data="<$=newestLetter.result[i].friendId$>">查看对话</span></a>
					</div>
				</div>
				
</div>
<$}$>
<$}$>	
<div class="pagination">
		<$==pagination$>
</div>
</script>

<!-- 查看对话 -->
<script type="text/html" id="showDialogue-template">
<$ if (hasNext) { $>
	<div class="more-detail">
		<a href="javascript:void(0)" data='{"uid":<$=result[0].userId$>,"fid":<$=result[0].friendId$>,"nextPage":<$=nextPage$>,"pageSize":<$=pageSize$>}' id="show_more_letter">
			<span class="more_arrow">«</span>查看更早的对话
		</a>
	</div>
<$}$>	
<$for(var i = (result.length-1);i >= 0;i--){$>
<div class="row-fluid">
	<div class="span12">
		<table class="table">
			<tbody>
				<tr>
					<td rowspan="4" style="width: 40px;height: 50px;position: relative;">
						<span class="time_stamp"><$=result[i].createDate$></span>						
					</td>
					<td rowspan="3" style="width: 61px; height: 61px;position:relative">
						<div class="message-user-pic">
							<a style="padding:0px" href="${ctx }/home?id=<$=result[i].userId$>">
								<img style="width: 60px; height: 60px;border:1px solid #C0C0C0;"src="<$=result[i].userAttachment$>" alt="40*40" />
							</a>
						</div>
					</td>
					<td colspan="5" style="text-align:botton;font-size:14px;"></td>
				</tr>
				<tr>
					<td colspan="5" style="text-align:botton;font-size:14px;word-break:break-all;">
					<a class="" href="${ctx }/home?id=<$=result[i].userId$>">
					<$if(result[i].userRole=='institution'){$>
						<i class="institution-icon" ></i>
					<$}else if(result[i].userRole=='charitarian'){$>
						<i class="charitarian-icon" ></i>
					<$}$>
						<$=result[i].userName$>
					</a>回复<a href="${ctx }/home?id=<$=result[i].friendId$>">
						<$if(result[i].friendRole=='institution'){$>
							<i class="institution-icon" ></i>
							<$}else if(result[i].friendRole=='charitarian'){$>
								<i class="charitarian-icon" ></i>
							<$}$>
								<$=result[i].friendName$></a>：<$=result[i].content$>
					</td>
				</tr>
				<tr>
					<td colspan="4" style="text-align: right;">
						<span class="chart color_theme" data="<$=result[i].userId$>">回复</span>
					</td>
				</tr>
			</tbody>
		</table>
		<div style="float:right;width:90%;border-bottom:1px dashed #C0C0C0;"></div>
	</div>
</div>			
<$}$>
</script>


	<!-- 优惠券地址列表 -->
	<script type="text/html" id="conaddress-template">
<$ if (result.length <= 0 ) { $>
	<span class="empty-center">还没有收货地址哦</span>
	<a class="btn address-link" href="${ctx }/home/profile#panel-address" >添加新地址</a>
<$}else{$>
<$for(var i = 0;i<result.length;i++){$>
<form>
<div class="form-input">
<input type="hidden" id="ad-id" name="id">
<input type="radio" name="radio" class="addradio" data='{"addressId":"<$=result[i].id$>"}'><span><$=result[i].provinceId$><$=result[i].districtId$><$=result[i].endRegion$>&nbsp;&nbsp;(<$=result[i].name$>&nbsp收)&nbsp<$=result[i].phone$></span>
<span class="default-address pull-right"><$=result[i].isDefault$></span>
</div>
<$}$>
</form>
<button class="btn btn-primary pull-left conadd-sure">确认</button>	
<$}$>
</script>
	<!-- 系统通知 -->
	<script type="text/html" id="systemInfor-template">
<$ if ( result.length <= 0 ) { $>
			<span class="empty-center">额哦，还没有系统通知哦.(=・ω・=)</span>
		<$}else{$>
<b><div class="message-count" style="margin-bottom: 5px;">共<$=totalCount$>条</div></b>
<$for(var i = 0;i<result.length;i++){$>
	<div class="comment-item clearfix">
		<div class="message-user-pic">
			<img src="<$=result[i].messageFrom.avatarUrl$>" alt="60*60" title="<$=result[i].messageFrom.name$>"/>
		</div>
		<div class="comment-right">
			<div>
				<span><$=result[i].messageFrom.name$> : </span><a class="message-user-div-a"href="${ctx }/home"></a><i></i> <p style="text-indent:2em"><$=result[i].content$></p>
			</div>
			<div class="message_time">
				<span class="msg_time" style="float:left;"><$=result[i].createdDate$></span><span class="chart pull-right btn-link" data='{"id":"<$=result[i].id $>"}'>删除</span> 
			</div>
		</div>
	</div>
<$}$><$}$>
<div class="pagination">
		<$==pagination$>
</div>
</script>

<!-- 优惠券模版 -->
<script type="text/html" id="coupon-template">
<$ if(result.length <= 0) { $>
<b style="width:100px;">
	<div class="message-count" style="margin-bottom: 5px;">共<$=totalCount$>条<span class="tellyou"><a href="${ctx }/home/message/coupon">优惠券使用说明</a></span>
    	<select class="pull-right" name="" id="couponsel">
			<option class="opt1" value="1">我的优惠券</option>
			<option class="opt2" value="2">失效优惠券</option>
		</select>
	 </div>
</b>
		<span class="empty-center">额哦，还没有优惠券哦.(=・ω・=)</span>
<$}else{$>
		<b style="width:100px;">
	<div class="message-count" style="margin-bottom: 5px;">共<$=totalCount$>条
<span class="tellyou"><a href="${ctx }/home/message/coupon">优惠券使用说明</a></span>
    	<select class="pull-right" name="" id="couponsel">
			<option class="opt1" value="1">我的优惠券</option>
			<option class="opt2" value="2">失效优惠券</option>
		</select>
	 </div>
</b>
<table class="table">
		<thead>
			<tr>
				<td style="width:60px;">编号</td>
                <td style="width:60px;">类型</td>
				<td style="width:180px;">内容</td>
				<td style="width:120px;">过期时间</td>
				<td style="width:60px;">金额</td>
				<td style="width:60px;">状态</td>
				<td class="operate" style="width:60px;">操作</td>
                
			</tr>
		</thead>
		<tbody>
		<$for(var i = 0;i < result.length; i++){$>
			<tr>
				<td><$= result[i].couponNo$></td>
                <td class="cou-label"><$=result[i].label$></td>
				<td><$= result[i].couponExplain$></td>
				<td class="coupontime"><$= result[i].overdueDate$></td>
				<td><$= result[i].couponValue$></td>
				<td class="couponstatus"><$= result[i].couponStatus$></td>
				<td class="operate">
					<$ if(result[i].label=="money") {$>
						<span class="btn-link money-btn" data='{"id":<$=result[i].id$>}'>使用</span>
                    <$}else if(result[i].label=="goods"){$>
                   <a href="#con-add" class="btn-link goods-btn" data-toggle="modal" data='{"id":<$=result[i].id$>}'><span>使用</span></a>
                   <$}else if(result[i].label=="activity") {$>
						<span class="btn-link activity-btn" data='{"id":<$=result[i].id$>}'>使用</span>
					<$}$>
				</td>
			</tr>
		<$}$>
		</tbody>
		</table>
	<$}$>
<div class="pagination">
		<$==pagination$>
</div>
</script>

<c:if test="${env == 'production' }">
	<script type="text/javascript">
		seajs.use("${ctx}/assets/js-dist/home/message-page");
	</script>
</c:if>
<c:if test="${env != 'production' }">
	<script type="text/javascript">
		seajs.use("${ctx}/assets/js/home/message-page");
	</script>
</c:if>
